/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package facade;

import entity.Groups;
import entity.Orders;
import entity.Role;
import entity.Users;
import java.util.Collection;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author shyfu_000
 */
@Local
public interface UsersFacadeLocal {

    void create(Users users);

    void edit(Users users);

    void remove(Users users);

    Users find(Object id);

    List<Users> findAll();

    List<Users> findRange(int[] range);
    
    List<Users> findRangeSortBy(int[] range,String sortBy);
    List<Users> findByKeyword(  int offset,  int noOfRecords, String keyword);
    List<Users> findRange(  int offset,  int noOfRecords);
    Collection<Groups> findGroupByUser(Integer idUser);
    Collection<Role> findRoleByUser(Integer idUser);
    int count();
    
    public entity.Users readByLogin(java.lang.String login);
    public boolean createUser(Users user, java.lang.String[] roles);
    
}
